<!--
 * @Descripttion: 
 * @version: 
 * @Author: Jun
 * @Date: 2021-05-24 16:06:00
 * @LastEditors: Jun
 * @LastEditTime: 2021-05-29 15:40:05
-->
<template>
  <el-dialog
    :visible.sync="dialogVisible"
    width="30%"
    :show-close="false"
    class="mydialog"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
  >
    <div class="title">
      <p>遵义职业技术学院</p>
      <p>考证在线报名收费系统</p>
    </div>

    <el-divider class="divider">登录方式</el-divider>

    <span class="iconfont wechatLogin" @click="toWeChatLogin">&#xe73b;</span>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      dialogVisible: true,
      appid: "wx7496665e5f925df9",
      redirect_uri: "http://t1.ossjk.com/zyjsxy-miniapp-api/pcWxlogin",
    };
  },
  methods: {
    toWeChatLogin() {
      let appid = this.appid;
      let redirect_uri = encodeURIComponent(this.redirect_uri);

      window.location.href = `https://open.weixin.qq.com/connect/qrconnect?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect`;
    },
  },
};
</script>

<style lang="scss" scoped>
.title {
  p {
    text-align: center;
    font-size: 30px;
  }
}
.divider {
  //分割线
  /deep/.el-divider__text {
    border: 1px solid #dcdfe6;
    border-radius: 10px;
  }
}

.wechatLogin {
  display: flex;
  justify-content: center;
  font-size: 30px;
  color: #04be02;
  cursor: pointer;
}
</style>
